package crivia.ecp.carry.html.div;

import crivia.ecp.carry.html.X;

public class Div extends X {
	
	public static Div createByClass(String cssClass){
		return (Div) new Div().setCssClass(cssClass);
	}
	
	public static Div createByID(String id){
		return (Div) new Div().addAttr("id", id);
	}
	
	public static Div create(String id,String cssClass){
		return (Div) new Div().setCssClass(cssClass).addAttr("id", id);
	}
	
	public static Div create(String idAndcssClass){
		return (Div) new Div().setCssClass(idAndcssClass).addAttr("id", idAndcssClass);
	}
	
	public Div setInner(Object o){
		inner = o;
		return this;
	}
	
	@Override
	protected String name() {
		return "div";
	}
	
	@Override
	protected String innerHTML() {
		return inner == null 
				? ""
				: inner.toString();
	}

}
